<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.fredck.FCKeditor.*"  %>
<%@ taglib uri="/FCKeditor" prefix="FCK" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
  

    <head>
    <script type="text/javascript" src="../js_editer/fckeditor.js"></script>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <style type="text/css">@import url(../css/jquery-calendar.css);</style>
    <script type="text/javascript" src="../js/jquery-calendar.js"></script>
    <script type="text/javascript" src="../js/jquery-calendar-zh-cn.js"></script>
    <script type="text/javascript">
    
	$(document).ready(function(){
       
		$("#addnews_btn").click(function(){
			var alertText = "";
			var newsTitle = $("#newsTitle_jq").attr("value");
			if((newsTitle == undefined)||(newsTitle == null)){
				$("#newsTitle_jq").css("background-color","#FF9");
				alertText += "请输入标题" + "\n";}
			if(alertText != ""){
				alert(alertText);
				$("#newsTitle_jq").focus();
				return false;}else{
					$("#createUserForm").submit();
				}
		})
    });
	
    function toSubmit(){
    		var alertText = "";
			var newsTitle = $("#newsTitle_jq").attr("value");
			if((newsTitle == undefined)||(newsTitle == null)){
				$("#newsTitle_jq").css("background-color","#FF9");
				alertText += "请输入标题" + "\n";}
			if(alertText != ""){
				alert(alertText);
				$("#newsTitle_jq").focus();
				return false;
				}else{
					$("#createUserForm").submit();
				}
    }
    </script>
<title>景区信息</title>
<link href="../css/mngMain.css" type="text/css" rel="stylesheet" />
</head>

  <body>
<div class="controlBox">
	<%@include file="../admin_top.jsp" %>
	<div class="mngMain">
		<div class="mngLeft">
			 <%@include file="../admin_menu.jsp" %>
		</div>
		<div class="mngRight">
			<div class="mngRightContainer">
				<div class="mngRightContainerT">添加景区信息</div>
				<div class="mngRightContainerM">
				<html:form action="addDetail.do" styleId="createUserForm" method="post" enctype="multipart/form-data">
					<table>
						<tr>
							<td width="10%"></td>
							<td>
								<font color="red"><bean:write name="info" ignore="true" filter="false"/></font>																
								<input type="hidden" name="parentId" 								
								value='<logic:present name="parentId" scope="request"><bean:write name="parentId"/></logic:present>'/>								
							</td>
						</tr>
						<tr>
							<th>类别：</th>
						  	<td>	
											<select name="parId" id="newsType_jq" style="width:152px" >
												<logic:notEmpty name="parentList">
													<logic:iterate id="presentation" name="parentList">													
														<option value="${presentation.presentationId}">${presentation.presentationName}&nbsp;[${presentation.parentName}]</option>
													</logic:iterate>
												</logic:notEmpty>
											</select></td>
						</tr>
						<tr>
							<th>标题：</th>
						  	<td><input type="text" name="detailName" id="newsTitle_jq" /><span> *</span></td>
						</tr>
						<tr>
							<th>内容：</th>
							<td><span></span></td>
						</tr>
						<tr>
							<td colspan="2">
								<FCK:editor id="content" basePath="/js_editor/" width="700" height="500" toolbarSet="Default">
									
								</FCK:editor>
							</td>
						</tr>						
						<tr>
							<td><input type="button" value="发布" src="../img/submitBtn.gif" onclick="javascript:toSubmit();" /></td>
							<td><input type="button" value="返回管理页" src="../img/submitBtn.gif" onclick="window.location.href('manageDetail.do')" /></td>
						</tr>
					</table>
					</html:form>
				</div>
			</div>
		</div>
	</div>
	<div class="mngBottom">
		<div class="mngLine"></div>
	</div>
</div>
</body>
</html>
